// windowSizeMixin.js
export const windowSizeMixin = {
  data() {
    return {
      width: window.innerWidth,
    };
  },
  methods: {
    updateWidth() {
      this.width = window.innerWidth;
    },
  },
  mounted() {
    window.addEventListener('resize', this.updateWidth);
  },
  unmounted() {
    window.removeEventListener('resize', this.updateWidth);
  },
};